<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
	<title>客户详情</title>
	<link rel="stylesheet" href="/layui/css/layui.css">
	<style type="text/css">
		body{
			background: #f0f2f5;
		}
		.clientDetail_container{
			padding: 16px;
			display: flex;
		}
		.clientDetail_main_container{
			flex: 2;
		}
		.clientDetail_mainUesr_container{
			background: #fff;
			padding: 24px;
			display: flex;
			justify-content: space-between;
			box-shadow: 0 1px 3px 0 rgba(0,0,0,.05);
		}
		.clientDetail_mainUesr_content{
			display: flex;
			align-items: center;
		}
		.clientDetail_mainUesr_content img{
			width: 64px;
			height: 64px;
			display: block;
		}
		.clientDetail_mainUesr_content h3{
			font-size: 18px;
			color: rgba(0, 0, 0, 0.85);
			margin-left: 16px;
		}
		.clientDetail_mainUesr_content p{
			color: #5ec75d;
			margin-left: 4px;
			font-size: 13px;
		}
		.clientDetail_mainTrends_container{
			min-height: 773px;
			margin: 12px 0 0;
			padding: 22px 24px;
			background: #fff;
			box-shadow: 0 1px 3px 0 rgba(0,0,0,.05);
		}
		.clientDetail_mainTrendsTitle_container{
			height: 32px;
			display: flex;
			align-items: center;
		}
		.clientDetail_mainTrendsTitle_container h2{
			font-size: 18px;
			color: #333;
		}
		.clientDetail_mainTrends_content{
			margin-top: 15px;
		}
		.clientDetail_mainTrends_content li{
			display: flex;
			justify-content: flex-start;
		}
		.clientDetail_mainTrendsLeft_container{
			padding: 0 20px 0 0;
		}
		.clientDetail_mainTrendsLeft_content{
			color: #7a828f;
		}
		.clientDetail_mainTrendsLeft_content b{
			margin: 0 5px -3px 0;
			font-size: 22px;
			font-weight: 500;
			color: rgba(0,0,0,.85);
		}
		.clientDetail_mainTrendsLeft_content span{
			
		}
		.clientDetail_mainTrendsCenter_container{
			flex: 1;
			display: flex;
			
		}
		.clientDetail_mainTrendsCenter_container svg{
			width: 16px;
			height: 16px;
			fill: #ccc;
			margin: 8px 15px 0 0;
		}
		.clientDetail_mainTrendsCenter_Info_container{
			display: flex;
			flex-direction: column;
			padding: 7px 0px 24px 0px;
		}
		.clientDetail_mainTrendsCenter_Info_container h4{
			font-size: 15px;
			line-height: 19px;
			color: #3b4c66;
		}
		.clientDetail_mainTrendsCenter_Info_content{
			display: flex;
			align-items: center;
			padding: 9px 16px;
			background: #f7fbff;
			border-radius: 2px;
			border: 1px solid #b4cbf8;
			margin: 8px 16px 0 0;
			overflow: hidden;
			flex-wrap: wrap;
		}
		.clientDetail_mainTrendsCenter_Info_content img{
			width: 20px;
			height: 20px;
			border-radius: 2px;
			margin: 0 6px;
		}
		.clientDetail_mainTrendsCenter_Info_content p{
			font-size: 14px;
			font-weight: 400;
			color: #3b4c66;
		}
		
		.clientDetail_mainTrendsRight_container{

		}
		.clientDetail_mainTrendsRight_container p{
			font-size: 13px;
			color: rgba(125,133,147,.85);
			min-width: 120px;
			text-align: right;
			padding-top: 7px;
		}
		.clientDetail_other_container{
			flex: 1;
			margin-left: 12px;
		}
		.clientDetail_mainTrendsCenterList_container{
			border-bottom: 1px dashed #ececec;
			flex:1;
		}
		.clientDetail_mainTrendsNone_content{
			font-size: 13px;
			font-weight: 400;
			color: #999;
			text-align: center;
			margin-top: 20px;
		}
		.clientDetail_GroupChat_container{
			background: #fff;
			padding: 20px 16px 16px 25px;
			box-shadow: 0 1px 3px 0 rgba(0,0,0,.05);
			margin-bottom: 12px;
			min-height: 182px;
		}
		.clientDetail_GroupChat_container h2{
			font-weight: 500;
			color: #333;
			padding-bottom: 8px;
			border-bottom: 1px solid #ececec;
			font-size: 15px;
		}
		.clientDetail_GroupChatNone_container{
			display: flex;
			justify-content: center;
			align-items: center;
			flex-direction: column;
			height: 154px;
		}
		.clientDetail_GroupChatNone_container svg{
			width: 78px;
			height: 78px;
		}
		.clientDetail_GroupChatNone_container p{
			font-size: 12px;
			color: rgba(0,0,0,0.45);
			margin-top: 5px;
		}
		.clientDetail_Service_container{
			background: #fff;
			padding: 17px 25px 28px;
			box-shadow: 0 1px 3px 0 rgba(0,0,0,.05);
		}
		.clientDetail_Service_container h2{
			font-weight: 500;
			color: #333;
			padding-bottom: 13px;
			border-bottom: 1px solid #ececec;
			font-size: 15px;
		}
		.clientDetail_ServiceNameList_container{
			display: flex;
			padding-top: 8px;
		}
		.clientDetail_ServiceNameList_container li{
			text-align: center;
			width: 66px;
			box-sizing: border-box;
			padding: 4px 2px;
			margin: 0 6px 0 0;
			font-size: 14px;
			font-weight: 400;
			color: #000;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
			word-break: normal;
			border-bottom: 2px solid #fff;
			cursor: pointer;
		}
		.clientDetail_ServiceNameList_active{
			border-bottom: 2px solid #1890ff !important;
		}
		.clientDetail_ServiceInfoList_container{
			margin-top: 12px;
		}
		.clientDetail_ServiceInfoList_container{
			
		}
		.clientDetail_ServiceInfoList_container li{
			display: flex;
			align-items: center;
			margin-top: 9px;
		}
		.clientDetail_ServiceInfoList_container li span{
			color: #999;
			font-size: 13px;
		}
		.clientDetail_ServiceInfoListName_container{
			font-size: 14px;
			background: #f7fbff;
			border-radius: 2px;
			border: 1px solid #b4cbf8;
			margin: 0;
			height: 36px;
			line-height: 36px;
			padding: 0 9px;
			color: #222;
			display: flex;
			align-items: center;
		}
		.clientDetail_ServiceInfoList_container li b{
			font-size: 13px;
			font-weight: 400;
			color: #000;
		}
		.clientDetail_clientInfo_container{
			background: #fff;
			padding: 17px 25px 28px;
			box-shadow: 0 1px 3px 0 rgba(0,0,0,.05);
		}
		.clientDetail_clientInfo_container h2{
			font-weight: 500;
			color: #333;
			padding-bottom: 13px;
			border-bottom: 1px solid #ececec;
			font-size: 15px;
		}
		.clientDetail_clientInfo_content{
			padding-top: 14px;
			padding-bottom: 10px;
			border-bottom: 1px dashed #f2f2f2;
		}
		.clientDetail_clientInfo_content li{
			padding-bottom: 10px;
			/*display: flex;
			align-items: center;*/
			overflow: hidden;
		}
		.clientDetail_clientInfo_content li span{
			margin: 0 4px 0 0;
			font-size: 14px;
			color: #999;
			float: left;
			width: 130px;
		}
		.clientDetail_clientInfo_content li b{
			font-size: 14px;
			color: #333;
			font-weight: normal;
			flex: 1;
			float: left;
		}
		.clientDetail_clientInfo_content li input{
			outline: none;
			appearance: none;
			border: 1px solid #d4d4d4;
			border-radius: 2px;
			height: 22px;
			line-height: 22px;
			color: #666;
			width: 200px;
		}
		#fields_all{
			padding-top: 14px;
		}
		#fields_all span{
			margin-bottom: 10px;
			font-size: 14px;
			color: #999;
			width: 130px;
			float: left;
		}
		#fields_all select{
			outline: none;
			border: 1px solid #d4d4d4;
			border-radius: 2px;
			height: 22px;
			line-height: 22px;
			margin-bottom: 10px;
			width: 200px;
			color: #666;
		}
		#fields_all input{
			outline: none;
			appearance: none;
			border: 1px solid #d4d4d4;
			border-radius: 2px;
			height: 22px;
			line-height: 22px;
			width: 200px;
			margin-bottom: 10px;
			color: #666;
		}
		.clientDetail_Lable_container{
			background: #fff;
			padding: 0px 25px 28px;
			box-shadow: 0 1px 3px 0 rgba(0,0,0,.05);
		}
		.clientDetail_Lable_container h2{
			font-weight: 500;
			color: #333;
			padding-bottom: 13px;
			border-bottom: 1px solid #ececec;
			font-size: 15px;
		}
		.clientDetail_LableTitle_container{
			display: flex;
			justify-content: space-between;
			align-items: center;
			padding: 12px 0 6px;
		}
		.clientDetail_LableTitle_container span{
			color: #333;
			font-size: 13px;
		}
		.clientDetail_LableTitleAdd_container{
			display: flex;
			align-items: center;
			cursor: pointer;
		}
		.clientDetail_LableTitleAdd_container svg{
			fill: #666;
			width: 15px;
			height: 15px;
		}
		.clientDetail_LableTitleAdd_container b{
			font-weight: normal;
			color: #666;
			font-size: 13px;
		}
		.clientDetail_LableNone_container{
			border-bottom: 1px solid #ececec;
		}
		.clientDetail_LableNone_content{
			display: flex;
			justify-content: center;
			align-items: center;
			flex-direction: column;
			height: 180px;
		}
		.clientDetail_LableNone_content svg{
			width: 84px;
			height: 84px;
		}
		.clientDetail_LableNone_content p{
			font-size: 13px;
			font-weight: 400;
			color: rgba(51,51,51,.49);
			margin-top: 5px;
		}
		.clientDetail_Lable_content{
			padding: 10px 5px;
			border-bottom: 1px solid #ececec;
		}
		.clientDetail_Lable_content ul{
			display: flex;
			flex-wrap: wrap;
		}
		.clientDetail_Lable_content ul li{
			height: 28px;
			padding: 0 14px;
			font-size: 14px;
			background: #f7f7f7;
			border-radius: 4px;
			color: rgba(0,0,0,.65);
			border: 1px solid #e9e9e9;
			display: flex;
			align-items: center;
			margin: 5px;
		}
		.{
			
		}
		.{
			
		}
		.{
			
		}
		.{
			
		}
		.clientDetail_ServiceInfoListName_container img{
			width: 20px;
			height: 20px;
			margin-right: 6px;
			display: block;
		}
		/*添加动态*/
		.dialog-content{
			height: 100%;
		}
		.ant-modal-content{
			position: relative;
		    background-color: #fff;
		    background-clip: padding-box;
		    border: 0;
		    border-radius: 4px;
		    box-shadow: 0 4px 12px rgba(0,0,0,.15);
		    pointer-events: auto;
		}
		.body{
			max-height: 800px;
    		overflow: auto;
		}
		.ant-modal-body{
			padding-right: 32px;
		}
		.pushSOP_main_contaienr{
			width: 485px;
			margin: 0 auto;
			padding: 32px 0 32px 0;
			background: #fff;
		}
		.pushSOP_title{
			font-size: 17px;
			width: 100%;
			text-align: center;
			margin-top: 2px;
			font-weight: 600;
			line-height: 24px;
			letter-spacing: 1px;
		}
		.pushSOP_button_content{
			display: flex;
			justify-content: flex-end;
			flex: 1;
			align-items: center;
		}

		/**/
		.addEvent_nav_container{
			display: flex;
			align-items: center;
			margin-bottom: 12px;
		}
		.addEvent_nav_container span{
			font-size: 15px;
			color: rgba(0,0,0,.45);
			padding-bottom: 6px;
			margin-right: 32px;
			cursor: pointer;
			border-bottom: 2px solid #fff;
		}
		.addEvent_navActive{
			font-weight: 700 !important;
			font-size: 15px !important;
			color: #1890ff !important;
			border-bottom: 2px solid #1890ff !important;
		}
		.addEvent_main_container{

		}
		.addEvent_mainCustom_container{

		}
		.addEvent_mainCustom_container textarea{
			background: #fbfbfb;
			border: 1px solid #eee;
			box-sizing: border-box;
			border-radius: 2px;
			resize: none;
			outline: none;
			padding: 11px 13px;
			width: 100%;
			height: 157px;
		}
		.addEvent_mainTemplate_container{

		}
		.addEvent_mainTemplate_selectEvent_container{
			display: flex;
			align-items: center;
			margin-bottom: 20px;
		}
		.addEvent_mainTemplate_selectEvent_container span:first-child{
			min-width: 70px;
			word-break: keep-all;
			white-space: nowrap;
			text-align: right;
			font-size: 14px;
			line-height: 20px;
			color: rgba(0,0,0,.65);
			font-weight: 400!important;
		}
		.addEvent_mainTemplate_selectEvent_container span:last-child{
			font-size: 14px;
			color: rgba(0,0,0,.65);
			font-weight: 400!important;
			display: flex;
			align-items: center;
			justify-content: center;
			color: #1890ff;
			cursor: pointer;
		}
		.addEvent_mainTemplate_dropDown_contianer{
			flex: 1;
			display: flex;

		}
		.addEvent_mainTemplate_dropDown_content{
			flex: 1;
			cursor: pointer;
			height: 36px;
			background: #fff;
			border: 1px solid #dcdfe6;
			box-sizing: border-box;
			border-radius: 4px;
			font-size: 14px;
			line-height: 28px;
			padding: 0 12px;
			margin-right: 12px;
			display: flex;
			position: relative;
		}
		.addEvent_mainTemplate_dropDownShow_content{
			display: flex;
			align-items: center;
			justify-content: space-between;
			flex: 1;
		}
		.addEvent_mainTemplate_dropDownShow_content p{
			flex: 1;
			color: #999;
			font-size: 14px;
		}
		.addEvent_mainTemplate_dropDownShow_content svg{

		}
		.addEvent_mainTemplate_dropDownHide_content{
			position: absolute;
			left: 0;
			right: 0;
			top: 41px;
			z-index: 1000;
			background: #fff;
			box-shadow: 0 2px 8px rgba(0,0,0,.25);
			border-radius: 4px;
			padding: 10px 0;
			max-height: 210px;
			overflow-x: hidden;
			overflow-y: auto;
		}
		.addEvent_mainTemplate_dropDownHide_content::-webkit-scrollbar{
			width:6px;
			height:6px;
		}
		.addEvent_mainTemplate_dropDownHide_content::-webkit-scrollbar-track{
			
		}
		.addEvent_mainTemplate_dropDownHide_content::-webkit-scrollbar-thumb{
			border-radius:20px;
			background:#c8c8c8;
			cursor:pointer
		}
		.addEvent_mainTemplate_dropDownHide_content li:hover{
			background: #f4fdff;
		}
		.addEvent_mainTemplate_dropDownHide_content li:hover svg{
			display: block;
			color: red;
		}
		.addEvent_mainTemplate_dropDownHide_content li{
			padding: 10px 10px 9px 20px;
			display: flex;
			align-items: center;
			justify-content: space-between;
		}
		.addEvent_mainTemplate_dropDownHide_content li p{
			flex:1;
			color: #777;
			max-width: 270px;
		}
		.addEvent_mainTemplate_dropDownHide_content li svg{
			margin-left: 10px;
			display: none;
		}
		.addEvent_mainTemplate_dropDownNew_contianer{
			display: flex;
			flex:1;
			align-items: center;
		}
		.addEvent_mainTemplate_dropDownNew_contianer input{
			flex: 1;
			height: 36px;
			background: #fff;
			border: 1px solid #dcdfe6;
			box-sizing: border-box;
			border-radius: 4px;
			font-size: 14px;
			line-height: 28px;
			padding: 0 12px;
			margin-right: 12px;
			display: flex;
			position: relative;
		}
		.addEvent_mainTemplate_dropDownNew_content{
			display: flex;
			align-items: center;
		}
		.addEvent_mainTemplate_dropDownNew_content span{
			min-width: auto !important;
			color: rgba(0,0,0,.25) !important;
			cursor: pointer;
		}
		.addEvent_mainTemplate_selectRemarks_container{
			display: flex;
		}
		.addEvent_mainTemplate_selectRemarks_container span{
			min-width: 70px;
			word-break: keep-all;
			white-space: nowrap;
			text-align: right;
			font-size: 14px;
			line-height: 20px;
			color: rgba(0,0,0,.65);
			font-weight: 400!important;
		}
		.addEvent_mainTemplate_selectRemarks_container textarea{
			background: #fbfbfb;
			border: 1px solid #eee;
			box-sizing: border-box;
			border-radius: 2px;
			resize: none;
			outline: none;
			padding: 11px 13px;
			flex: 1;
			height: 157px;
		}
		.addEvent_score_container{
			padding: 10px 0;
		}
		.addEvent_scoreAdd_container{

		}
		.addEvent_scoreAdd_container button{
			outline: none;
			border: 1px solid #1890ff;
			background: #fff;
			border-radius: 3px;
			padding: 0 10px;
			line-height: 28px;
			color: #1890ff;
			cursor: pointer;
		}
		.addEvent_scoreDelete_container{
			
		}
		.addEvent_scoreDelete_container button{
			outline: none;
			border: 1px solid #1890ff;
			background: #fff;
			border-radius: 3px;
			padding: 0 10px;
			line-height: 28px;
			color: #1890ff;
			cursor: pointer;
			margin-bottom: 10px;
		}
		.addEvent_scoreDelete_content{
			display: flex;
			align-items: center;
			flex: 1;
		}
		.addEvent_scoreDelete_content p{
			color: rgba(0,0,0,.65);
			font-size: 14px;
		}
		.addEvent_scoreDelete_content input{
			height: 32px;
			padding: 4px 11px;
			color: rgba(0,0,0,.65);
			font-size: 14px;
			line-height: 1.5;
			background-color: #fff;
			background-image: none;
			border: 1px solid #d9d9d9;
			border-radius: 4px;
			width: 55px;
			box-sizing: border-box;
			margin-left: 5px;
		}
		.addEvent_scoreDelete_content span{
			width: 32px;
			height: 32px;
			background: #fafafa;
			border-radius: 0 3px 3px 0;
			border: 1px solid #e8e8e8;
			display: flex;
			align-items: center;
			justify-content: center;
			color: rgba(0,0,0,.65);
			border-radius: 4px;
		}
		/*新加的上传图片*/
		.layui-upload-img{
			width: 92px;
			height: 92px;
			cursor: pointer;
			margin: 9px;
		}
		/*新加的上传图片*/
		.layui-upload-img-body{
			width: 92px;
			height: 92px;
			cursor: pointer;
			margin: 9px;
		}
	</style>
</head>
<body>
	<div class="clientDetail_container">
		<div class="clientDetail_main_container">
			<div class="clientDetail_mainUesr_container">
				<div class="clientDetail_mainUesr_content">
					<img src="{$et->avatar}">
					<h3>{$et->name}</h3>
					<p>
						{if $et->type == 1}
							@微信
						{else}
							@{$et->corp_name}
						{/if}
					</p>
				</div>
				<div>
					<a class="layui-btn  add_dynamic" href="javascript::void(0)">添加动态</a>
				</div>
			</div>
			<div class="clientDetail_mainTrends_container">
				<div class="clientDetail_mainTrendsTitle_container" id="title_container">
					<h2>客户动态</h2>
				</div>
				{loop $etDynamic as $k=>$etdynamic}
					<ul class="clientDetail_mainTrends_content" data-date="{$k}">
					<li>
						<div class="clientDetail_mainTrendsLeft_container">
							<div class="clientDetail_mainTrendsLeft_content">
								<b>
									{explode('_',$k)[1]}
								</b>
								<span>
									{explode('_',$k)[0]}月
								</span>
							</div>
						</div>
						<ul class="clientDetail_mainTrendsCenterList_container">
							{loop $etdynamic as $dynamic}
								{if $dynamic['type'] == 1}
									<li>
										<div class="clientDetail_mainTrendsCenter_container">
											<svg viewBox="0 0 1024 1024"><path d="M571.072 10.88c9.92-12.736 28.864-13.952 40.448-2.432l387.008 387.072a27.264 27.264 0 0 1-2.432 40.32 302.72 302.72 0 0 1-295.936 45.76l-56.192 56.192a416 416 0 0 1-46.912 457.024 31.872 31.872 0 0 1-46.976 2.496l-229.76-229.76-149.888 149.76a57.216 57.216 0 0 1-80.768 0 57.216 57.216 0 0 1 0-80.768l149.76-149.888-229.76-229.76a31.808 31.808 0 0 1-1.792-42.624l4.288-4.352a416.064 416.064 0 0 1 456.96-47.168l56.128-56.064A302.976 302.976 0 0 1 571.072 10.944z"></path></svg>
											<div class="clientDetail_mainTrendsCenter_Info_container">
												<h4>添加好友</h4>
												<div class="clientDetail_mainTrendsCenter_Info_content">
													<img src="{$h->get_et_by_userid($dynamic['wid'],$dynamic['external_userid'])['avatar']}">
													<p>{$h->get_et_by_userid($dynamic['wid'],$dynamic['external_userid'])['name']} 添加了</p>
													<img src="{$h->get_user_by_id($dynamic['wid'],$dynamic['user_id'])['avatar']}">
													<p>{$h->get_user_by_id($dynamic['wid'],$dynamic['user_id'])['name']} 为好友</p>
												</div>
											</div>
										</div>
										<div class="clientDetail_mainTrendsRight_container">
											<p>{date('Y-m-d H:i:s',$dynamic['ctime'])}</p>
										</div>
									</li>
								{else if $dynamic['type'] == 2}
									<li>
										<div class="clientDetail_mainTrendsCenter_container">
											<svg viewBox="0 0 1024 1024"><path d="M571.072 10.88c9.92-12.736 28.864-13.952 40.448-2.432l387.008 387.072a27.264 27.264 0 0 1-2.432 40.32 302.72 302.72 0 0 1-295.936 45.76l-56.192 56.192a416 416 0 0 1-46.912 457.024 31.872 31.872 0 0 1-46.976 2.496l-229.76-229.76-149.888 149.76a57.216 57.216 0 0 1-80.768 0 57.216 57.216 0 0 1 0-80.768l149.76-149.888-229.76-229.76a31.808 31.808 0 0 1-1.792-42.624l4.288-4.352a416.064 416.064 0 0 1 456.96-47.168l56.128-56.064A302.976 302.976 0 0 1 571.072 10.944z"></path></svg>
											<div class="clientDetail_mainTrendsCenter_Info_container">
												<h4>删除好友</h4>
												<div class="clientDetail_mainTrendsCenter_Info_content">
													<img src="{$h->get_user_by_id($dynamic['wid'],$dynamic['user_id'])['avatar']}">
													<p>{$h->get_user_by_id($dynamic['wid'],$dynamic['user_id'])['name']} 把</p>
													<img src="{$h->get_et_by_userid($dynamic['wid'],$dynamic['external_userid'])['avatar']}">
													<p>{$h->get_et_by_userid($dynamic['wid'],$dynamic['external_userid'])['name']} 从好友中删除了</p>
												</div>
											</div>
										</div>
										<div class="clientDetail_mainTrendsRight_container">
											<p>{date('Y-m-d H:i:s',$dynamic['ctime'])}</p>
										</div>
									</li>
								{else if $dynamic['type'] == 3}
									<li>
										<div class="clientDetail_mainTrendsCenter_container">
											<svg viewBox="0 0 1024 1024"><path d="M571.072 10.88c9.92-12.736 28.864-13.952 40.448-2.432l387.008 387.072a27.264 27.264 0 0 1-2.432 40.32 302.72 302.72 0 0 1-295.936 45.76l-56.192 56.192a416 416 0 0 1-46.912 457.024 31.872 31.872 0 0 1-46.976 2.496l-229.76-229.76-149.888 149.76a57.216 57.216 0 0 1-80.768 0 57.216 57.216 0 0 1 0-80.768l149.76-149.888-229.76-229.76a31.808 31.808 0 0 1-1.792-42.624l4.288-4.352a416.064 416.064 0 0 1 456.96-47.168l56.128-56.064A302.976 302.976 0 0 1 571.072 10.944z"></path></svg>
											<div class="clientDetail_mainTrendsCenter_Info_container">
												<h4>客户流失</h4>
												<div class="clientDetail_mainTrendsCenter_Info_content">
													<img src="{$h->get_et_by_userid($dynamic['wid'],$dynamic['external_userid'])['avatar']}">
													<p>{$h->get_et_by_userid($dynamic['wid'],$dynamic['external_userid'])['name']} 把</p>
													<img src="{$h->get_user_by_id($dynamic['wid'],$dynamic['user_id'])['avatar']}">
													<p>{$h->get_user_by_id($dynamic['wid'],$dynamic['user_id'])['name']} 从好友中删除了</p>
												</div>
											</div>
										</div>
										<div class="clientDetail_mainTrendsRight_container">
											<p>{date('Y-m-d H:i:s',$dynamic['ctime'])}</p>
										</div>
									</li>
								{else if $dynamic['type'] == 4}
									<li>
										<div class="clientDetail_mainTrendsCenter_container">
											<svg viewBox="0 0 1024 1024"><path d="M571.072 10.88c9.92-12.736 28.864-13.952 40.448-2.432l387.008 387.072a27.264 27.264 0 0 1-2.432 40.32 302.72 302.72 0 0 1-295.936 45.76l-56.192 56.192a416 416 0 0 1-46.912 457.024 31.872 31.872 0 0 1-46.976 2.496l-229.76-229.76-149.888 149.76a57.216 57.216 0 0 1-80.768 0 57.216 57.216 0 0 1 0-80.768l149.76-149.888-229.76-229.76a31.808 31.808 0 0 1-1.792-42.624l4.288-4.352a416.064 416.064 0 0 1 456.96-47.168l56.128-56.064A302.976 302.976 0 0 1 571.072 10.944z"></path></svg>
											<div class="clientDetail_mainTrendsCenter_Info_container">
												<h4>加入群聊</h4>
												<div class="clientDetail_mainTrendsCenter_Info_content">
													<img src="{$h->get_et_by_userid($dynamic['wid'],$dynamic['external_userid'])['avatar']}">
													<p>{$h->get_et_by_userid($dynamic['wid'],$dynamic['external_userid'])['name']} 加入群聊</p>
													<p>【{$h->get_group_chat($dynamic['wid'],$dynamic['chat_id'])['name']}】</p>
												</div>
											</div>
										</div>
										<div class="clientDetail_mainTrendsRight_container">
											<p>{date('Y-m-d H:i:s',$dynamic['ctime'])}</p>
										</div>
									</li>
								{else if $dynamic['type'] == 5}
									<li>
										<div class="clientDetail_mainTrendsCenter_container">
											<svg viewBox="0 0 1024 1024"><path d="M571.072 10.88c9.92-12.736 28.864-13.952 40.448-2.432l387.008 387.072a27.264 27.264 0 0 1-2.432 40.32 302.72 302.72 0 0 1-295.936 45.76l-56.192 56.192a416 416 0 0 1-46.912 457.024 31.872 31.872 0 0 1-46.976 2.496l-229.76-229.76-149.888 149.76a57.216 57.216 0 0 1-80.768 0 57.216 57.216 0 0 1 0-80.768l149.76-149.888-229.76-229.76a31.808 31.808 0 0 1-1.792-42.624l4.288-4.352a416.064 416.064 0 0 1 456.96-47.168l56.128-56.064A302.976 302.976 0 0 1 571.072 10.944z"></path></svg>
											<div class="clientDetail_mainTrendsCenter_Info_container">
												<h4>点击雷达记录</h4>
												<div class="clientDetail_mainTrendsCenter_Info_content">
													<img src="{$h->get_et_by_userid($dynamic['wid'],$dynamic['external_userid'])['avatar']}">
													<p>{$h->get_et_by_userid($dynamic['wid'],$dynamic['external_userid'])['name']} 点击了标题是【{$h->get_radar($dynamic['glian_id'])['link_title']}】的雷达</p>
													<!-- <p>【】</p> -->
												</div>
											</div>
										</div>
										<div class="clientDetail_mainTrendsRight_container">
											<p>{date('Y-m-d H:i:s',$dynamic['ctime'])}</p>
										</div>
									</li>
								{else if $dynamic['type'] == 6}
									<li>
										<div class="clientDetail_mainTrendsCenter_container">
											<svg viewBox="0 0 1024 1024"><path d="M571.072 10.88c9.92-12.736 28.864-13.952 40.448-2.432l387.008 387.072a27.264 27.264 0 0 1-2.432 40.32 302.72 302.72 0 0 1-295.936 45.76l-56.192 56.192a416 416 0 0 1-46.912 457.024 31.872 31.872 0 0 1-46.976 2.496l-229.76-229.76-149.888 149.76a57.216 57.216 0 0 1-80.768 0 57.216 57.216 0 0 1 0-80.768l149.76-149.888-229.76-229.76a31.808 31.808 0 0 1-1.792-42.624l4.288-4.352a416.064 416.064 0 0 1 456.96-47.168l56.128-56.064A302.976 302.976 0 0 1 571.072 10.944z"></path></svg>
											<div class="clientDetail_mainTrendsCenter_Info_container">
												<h4>点击朋友圈记录</h4>
												<div class="clientDetail_mainTrendsCenter_Info_content">
													<img src="{$h->get_et_by_userid($dynamic['wid'],$dynamic['external_userid'])['avatar']}">
													<p>{$h->get_et_by_userid($dynamic['wid'],$dynamic['external_userid'])['name']} 点击了 {$h->get_user_by_id($dynamic['wid'],$dynamic['user_id'])['name']} 的朋友圈</p>
													<!-- <p>【】</p> -->
												</div>
											</div>
										</div>
										<div class="clientDetail_mainTrendsRight_container">
											<p>{date('Y-m-d H:i:s',$dynamic['ctime'])}</p>
										</div>
									</li>
								{else if $dynamic['type'] == 7}
									<li>
										<div class="clientDetail_mainTrendsCenter_container">
											<svg viewBox="0 0 1024 1024"><path d="M571.072 10.88c9.92-12.736 28.864-13.952 40.448-2.432l387.008 387.072a27.264 27.264 0 0 1-2.432 40.32 302.72 302.72 0 0 1-295.936 45.76l-56.192 56.192a416 416 0 0 1-46.912 457.024 31.872 31.872 0 0 1-46.976 2.496l-229.76-229.76-149.888 149.76a57.216 57.216 0 0 1-80.768 0 57.216 57.216 0 0 1 0-80.768l149.76-149.888-229.76-229.76a31.808 31.808 0 0 1-1.792-42.624l4.288-4.352a416.064 416.064 0 0 1 456.96-47.168l56.128-56.064A302.976 302.976 0 0 1 571.072 10.944z"></path></svg>
											<div class="clientDetail_mainTrendsCenter_Info_container">
												<h4>{$dynamic['glian_id'] ? $h->get_template_event($dynamic['glian_id'])['name'] : '跟进记录'}</h4>
												<div class="clientDetail_mainTrendsCenter_Info_content">
													<img src="{$h->get_et_by_userid($dynamic['wid'],$dynamic['external_userid'])['avatar']}">
													<p>{$h->get_et_by_userid($dynamic['wid'],$dynamic['external_userid'])['name']} 添加【{$dynamic['content']}】</p>
													<!-- <p>【】</p> -->
												</div>
												{if $dynamic['content_sup']}
												<div class="">
													{loop json_decode($dynamic['content_sup'],1)  as $content_sup_key => $content_sup}
														{if $content_sup_key == 'image'}
														{loop $content_sup as $img}
														<img src="{$img}" class="layui-upload-img-body">
														{/loop}
														{/if}
													{/loop}
												</div>
												{/if}
											</div>
										</div>
										<div class="clientDetail_mainTrendsRight_container">
											<p>{date('Y-m-d H:i:s',$dynamic['ctime'])}</p>
										</div>
									</li>
								{/if}
							{/loop}
						</ul>
						
					</li>
				</ul>
				{/loop}

				<div class="clientDetail_mainTrendsNone_content">
					<p>没有更多了</p>
				</div>
			</div>
		</div>
		<div class="clientDetail_other_container">
			<div class="clientDetail_GroupChat_container">
				<h2>所在群聊</h2>
				{if $groupchat}
				<!-- 有数据时显示 -->
				<div class="clientDetail_GroupChat_content">
					{loop $groupchat as $group}
						{$group->name}
					{/loop}
				</div>
				{else}
				<!-- 没数据时显示 -->
				<div class="clientDetail_GroupChatNone_container">
					<svg t="1596380304623" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2285" width="200" height="200"><path d="M866.8 244.4h-40.9 16.2c13.8 0.8 24.7 12.2 24.7 26.2v-26.2zM520.9 740.4c16 16 16 41.9 0 57.9L409.1 910.1c-16 16-41.9 16-57.9 0s-16-41.9 0-57.9L463 740.4c16-16 41.9-16 57.9 0z" fill="#bfbfbf" p-id="2286"></path><path d="M887 163H314.5c-22.6 0-41 18.3-41 41 0 22.6 18.3 41 41 41h552.3v367.2c0 22.6 18.3 41 41 41s41-18.3 41-41V227.9c-1.6-34.2-28.1-61.8-61.8-64.9z" fill="#bfbfbf" p-id="2287"></path><path d="M760.4 278.4H146.9c-38.5 0-70.1 31.5-70.1 70.1v391.8c0 38.5 31.5 70.1 70.1 70.1h613.5c38.5 0 70.1-31.5 70.1-70.1V348.5c-0.1-38.6-31.6-70.1-70.1-70.1z m-405.8 266c0 22.6-18.3 41-41 41h-38.1c-22.6 0-41-18.3-41-41 0-22.6 18.3-41 41-41h38.1c22.6 0 41 18.3 41 41z m158.3 0c0 22.6-18.3 41-41 41h-38.1c-22.6 0-41-18.3-41-41 0-22.6 18.3-41 41-41h38.1c22.6 0 41 18.3 41 41z m158.3 0c0 22.6-18.3 41-41 41h-38.1c-22.6 0-41-18.3-41-41 0-22.6 18.3-41 41-41h38.1c22.6 0 41 18.3 41 41z" fill="#bfbfbf" p-id="2288"></path></svg>
					<p>该客户不在任何群聊内</p>
				</div>
				{/if}
				
				
			</div>
			<div class="clientDetail_Service_container">
				<h2>所属客服</h2>
				<ul class="clientDetail_ServiceNameList_container">
					<li class="clientDetail_ServiceNameList_active"
						data-name="{$et->user->name}"
						data-r_user_id="{$et->r_user_id}" 
						data-avatar="{$et->user->avatar}"
						data-add_way="{$addWayArr[$et->add_way]}"
						data-createtime="{date('Y-m-d H:i:s',$et->createtime)}" 
						data-gender="{$et->gender == 1?'男性':'女性'}" 
						data-remark="{$et->remark?$et->remark:'--'}" 
						data-mobile="{$et->remark_mobiles}" 
						data-qq="{$user_con['qq']}" 
						data-birthday="{$user_con['birthday']}" 
						data-age="{$user_con['age']}" 
						data-email="{$user_con['email']}" 
						data-weibo="{$user_con['weibo']}" 
						data-address="{$user_con['address']}" 
						data-description="{$et->description?$et->description:'--'}"
						data-fields='{$et->fields}'>{$et->user->name}
					</li>
					{loop@i $etAll as $etall}
						<li
						data-id="{$etall->id}"
						data-r_user_id="{$etall->r_user_id}"
						data-name="{$etall->user->name}"
						data-avatar="{$etall->user->avatar}"
						data-add_way="{$addWayArr[$etall->add_way]}"
						data-createtime="{date('Y-m-d H:i:s',$etall->createtime)}" 
						data-gender="{$etall->gender == 1?'男性':'女性'}" 
						data-remark="{$etall->remark?$etall->remark:'--'}" 
						data-qq="{$etall->custom['qq']}" 
						data-mobile="{$etall->remark_mobiles}" 
						data-birthday="{$etall->custom['birthday']}" 
						data-age="{$etall->custom['age']}" 
						data-email="{$etall->custom['email']}" 
						data-weibo="{$etall->custom['weibo']}" 
						data-address="{$etall->custom['address']}" 
						data-description="{$etall->description?$etall->description:'--'}"
						data-fields='{$etall->fields}'>{$etall->user->name}
					</li>
					{/loop}
					<!--<li class="clientDetail_ServiceNameList_active">赵子豪</li>
					<li>张经理</li>-->
				</ul>
				<ul class="clientDetail_ServiceInfoList_container">
					<li>
						<span>客服名称：</span>
						<div class="clientDetail_ServiceInfoListName_container">
							<img id="user_avatar" src="{$et->user->avatar}">
							<p id="user_name">{$et->user->name}</p>
						</div>
					</li>
					<li>
						<span>最后沟通时间：</span>
						<b>--</b>
					</li>
				</ul>
			</div>
			<div class="clientDetail_clientInfo_container">
				<h2>客户信息</h2>
				<ul class="clientDetail_clientInfo_content">
					{if $message->user_add_way == 1} 
					<li>
						<span>来源：</span>
						<b id="user_add_way">{$addWayArr[$et->add_way]}</b>
						<!-- <b id="source">{$user_con['source']?$user_con['source']:'--'}</b> -->
					</li>
					{/if}
					{if $message->user_createtime == 1}
					<li>
						<span>时间：</span>
						<b id="user_createtime">{date('Y-m-d H:i:s',$et->createtime)}</b>
					</li>
					{/if}
					{if $message->user_gender == 1}
					<li>
						<span>性别：</span>
						<b id="user_gender">
						{if $et->gender == 1}
							男性
						{else if $et->gender == 2}
							女性
						{else}
							未知
						{/if}
						</b>
					</li>
					{/if}
					{if $message->user_mobiles == 1}
					<li>
						<span>电话：</span>
						<b id="user_mobiles">
							<input type="hidden" value="{$et->id}" id="ids" >
							<input type="text" placeholder="多个手机号请用英文逗号分隔开" name="title" data-names="电话" data-type="mobiles"  value="{$et->remark_mobiles?$et->remark_mobiles:''}"  {if $et->r_user_id}disabled='disabled'{/if}></b>
					</li>
					{/if}
					{if $message->age == 1}
					<li>
						<span>年龄：</span>
						<b id="age">
							<input type="hidden" value="{$et->id}" id="ids" >
							<input type="text" name="title"  data-names="年龄" data-type="age" value="{$user_con['age']?$user_con['age']:'--'}" {if $et->r_user_id}disabled='disabled'{/if} ></b>
					</li>
					{/if}
					{if $message->email == 1}
					<li>
						<span>邮箱：</span>
						<b id="email">
							<input type="hidden" value="{$et->id}" id="ids" >
							<input type="text" name="title"  data-names="邮箱" data-type="email" value="{$user_con['email']?$user_con['email']:'--'}" {if $et->r_user_id}disabled='disabled'{/if}></b>
					</li>
					{/if}
					{if $message->birthday == 1}
					<li>
						<span>生日：</span>
						<b id="birthday">
							<input type="hidden" value="{$et->id}" id="ids" >
							<input type="text" name="title"  data-names="生日" data-type="birthday" value="{$user_con['birthday']?$user_con['birthday']:'--'}"  {if $et->r_user_id}disabled='disabled'{/if}></b>
					</li>
					{/if}
					{if $message->weibo == 1}
					<li>
						<span>微博：</span>
						<b id="weibo">
							<input type="hidden" value="{$et->id}" id="ids">
							<input type="text" name="title"  data-names="微博" data-type="weibo"  value="{$user_con['weibo']?$user_con['weibo']:'--'}"  {if $et->r_user_id}disabled='disabled'{/if}></b>
					</li>
					{/if}
					{if $message->qq == 1}
					<li>
						<span>QQ&nbsp;：</span>
						<b id="qq">
							<input type="hidden" value="{$et->id}" id="ids" >
							<input type="text" name="title"  data-names="QQ" data-type="qq" value="{$user_con['qq']?$user_con['qq']:'--'}"  {if $et->r_user_id}disabled='disabled'{/if}></b>
					</li>
					{/if}
					{if $message->address == 1}
					<li>
						<span>地址：</span>
						<b id="address">
							<input type="hidden" value="{$et->id}" id="ids" >
							<input type="text" name="title" data-names="地址" data-type="address"  value="{$user_con['address']?$user_con['address']:'--'}"  {if $et->r_user_id}disabled='disabled'{/if}></b>
					</li>
					{/if}
					{if $message->user_description == 1}
					<li>
						<span>描述：</span>
						<b id="user_description">
							<input type="hidden" value="{$et->id}" id="ids" >
							<input type="text" name="title"  data-names="描述" data-type="description" value="{$et->description?$et->description:'--'}" name=""  {if $et->r_user_id}disabled='disabled'{/if}></b>
					</li>
					{/if}
					<!-- <li>
						<span>客户阶段：</span>
						<b id="user_description">
							<select name="names" id="larel_name">
								<span><option value="{$larel_one->id}" >{$larel_one->name}</option></span>
								{loop $arr as $larels}
								<option value="{$larels->id}">{$larels->name}</option>
								{/loop}
							</select>
						</b>
					</li> -->
				</ul>
				<div id="fields_all">
					{loop $fields as $value}
						<span>{$value->title}：</span>
						{if $value->is_x}
							{if $value->status == 1}
								<input type="text" name="text" onblur="tex('{$value->id}','{$et->id}','{$et->wid}',this)" value="{$value->contents}"  {if $et->r_user_id}disabled='disabled'{/if}>
							{else}
								<select onchange="sele('{$value->id}','{$et->id}','{$et->wid}',this)"  {if $et->r_user_id}disabled='disabled'{/if}>
									<option value="{$value->contents}">{$value->contents}</option>
									{loop $value->content as $content}
										{if $value->contents != $content}
											<option value="{$content}">{$content}</option>
										{/if}
									{/loop}
								</select>
							{/if}
						{else}
							{if $value->status == 1}
								<input type="text" onblur="tex('{$value->id}','{$et->id}','{$et->wid}',this)" name="text" value=""  {if $et->r_user_id}disabled='disabled'{/if}>
							{else}
								<select onchange="sele('{$value->id}','{$et->id}','{$et->wid}',this)"  {if $et->r_user_id}disabled='disabled'{/if}>
									<option value=""></option>
									{loop $value->content as $content}
										<option value="{$content}">{$content}</option>
									{/loop}
								</select>
							{/if}
						{/if}
						<br>
					{/loop}
				</div>
			</div>
			<!--<div class="clientDetail_Lable_container">
				<h2>赵子豪给ta的标签</h2>
				<div class="clientDetail_LableTitle_container">
					<span>企业标签：</span>
					<div class="clientDetail_LableTitleAdd_container">
						<svg t="1596445150680" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2035" width="200" height="200"><path d="M870.592 421.488L811.2 456.096a285.824 285.824 0 0 1 0 111.808l59.456 34.608a51.424 51.424 0 0 1 18.592 69.936L838.4 761.152a50.56 50.56 0 0 1-69.36 18.736l-60.064-34.976a303.728 303.728 0 0 1-95.424 56.432V844.8a50.992 50.992 0 0 1-50.768 51.2h-101.568a50.992 50.992 0 0 1-50.784-51.2v-43.456a303.696 303.696 0 0 1-95.424-56.432l-60.064 34.976a50.544 50.544 0 0 1-69.344-18.736l-50.784-88.688a51.424 51.424 0 0 1 18.592-69.936l59.392-34.624a285.872 285.872 0 0 1 0-111.808l-59.392-34.608a51.424 51.424 0 0 1-18.592-69.936l50.784-88.688a50.544 50.544 0 0 1 69.36-18.736l60.064 34.96a303.696 303.696 0 0 1 95.424-56.432V179.2A50.992 50.992 0 0 1 461.216 128h101.552a50.992 50.992 0 0 1 50.784 51.2v43.456a303.696 303.696 0 0 1 95.424 56.432l60.064-34.96a50.544 50.544 0 0 1 69.36 18.736l50.768 88.688a51.424 51.424 0 0 1-18.576 69.936z m-38.08-66.512l-25.392-44.336a25.28 25.28 0 0 0-34.688-9.376L701.904 342.4a252.976 252.976 0 0 0-139.2-81.184V204.8a25.488 25.488 0 0 0-25.392-25.6h-50.704a25.488 25.488 0 0 0-25.392 25.6v56.336a252.96 252.96 0 0 0-139.2 81.184l-70.544-41.072a25.28 25.28 0 0 0-34.688 9.376l-25.392 44.336a25.712 25.712 0 0 0 9.296 34.976l70.832 41.232a248.928 248.928 0 0 0 0 161.6l-70.816 41.232a25.712 25.712 0 0 0-9.296 34.976l25.392 44.336a25.264 25.264 0 0 0 34.688 9.376l70.608-41.088a252.976 252.976 0 0 0 139.2 81.184V819.2a25.488 25.488 0 0 0 25.392 25.6h50.784a25.488 25.488 0 0 0 25.392-25.6v-56.336a252.976 252.976 0 0 0 139.2-81.184l70.544 41.072a25.264 25.264 0 0 0 34.688-9.376l25.392-44.336a25.712 25.712 0 0 0-9.296-34.976l-70.832-41.232a248.928 248.928 0 0 0 0-161.6l70.832-41.232a25.712 25.712 0 0 0 9.12-35.024zM512 640a128 128 0 1 1 126.944-128A127.472 127.472 0 0 1 512 640z m0-204.8a76.8 76.8 0 1 0 76.16 76.8A76.48 76.48 0 0 0 512 435.2z" p-id="2036"></path></svg>
						<b>管理</b>
					</div>
				</div>
				
				<div class="clientDetail_LableNone_container" style="display: none;">
					<div class="clientDetail_LableNone_content">
						<svg t="1596380779368" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5182" width="200" height="200"><path d="M23 82.6h61.1c4.2 0 7.6 3.4 7.6 7.6 0 4.2-3.4 7.6-7.6 7.6H23c-4.2 0-7.6-3.4-7.6-7.6 0-4.2 3.4-7.6 7.6-7.6z" fill="#dbdbdb" p-id="5183"></path><path d="M53.6 52c4.2 0 7.6 3.4 7.6 7.6v61.1c0 4.2-3.4 7.6-7.6 7.6-4.2 0-7.6-3.4-7.6-7.6V59.6c0-4.2 3.4-7.6 7.6-7.6z" fill="#dbdbdb" p-id="5184"></path><path d="M358.4 122.3l29.5 7.9c4.1 1.1 6.5 5.3 5.4 9.4-1.1 4.1-5.3 6.5-9.4 5.4l-29.5-7.9c-4.1-1.1-6.5-5.3-5.4-9.4 1.2-4.1 5.3-6.5 9.4-5.4z" fill="#dbdbdb" p-id="5185"></path><path d="M412.8 79.4l7.9 29.5c1.1 4.1-1.3 8.3-5.4 9.4-4.1 1.1-8.3-1.3-9.4-5.4L398 83.3c-1.1-4.1 1.3-8.3 5.4-9.4 4.1-1 8.3 1.4 9.4 5.5z" fill="#dbdbdb" p-id="5186"></path><path d="M477.1 105l-21.6 21.6c-3 3-7.8 3-10.8 0-3-3-3-7.8 0-10.8l21.6-21.6c3-3 7.8-3 10.8 0 3 3 3 7.8 0 10.8z" fill="#dbdbdb" p-id="5187"></path><path d="M939 119.3c-25.3 0-45.8 20.5-45.8 45.9 0 25.3 20.5 45.8 45.8 45.8s45.9-20.5 45.9-45.8c-0.1-25.4-20.6-45.9-45.9-45.9z m0 76.4c-16.9 0-30.6-13.7-30.6-30.6 0-16.9 13.7-30.6 30.6-30.6s30.6 13.7 30.6 30.6c-0.1 16.9-13.8 30.6-30.6 30.6z" fill="#dbdbdb" p-id="5188"></path><path d="M763.9 32L718 50.6v61.1l45.9-18.6V32z" fill="#dbdbdb" p-id="5189"></path><path d="M664.4 93.1l45.9 18.6V50.6L664.4 32v61.1zM763.9 25.9L714.7 6.5l-50.3 17.4 50.1 21.3 49.4-19.3z" fill="#dbdbdb" p-id="5190"></path><path d="M917.1 388.2l-458.5-61.1v242.3l458.5 48.1V388.2z" fill="#dbdbdb" p-id="5191"></path><path d="M91.8 406.4l366.8-79.3v275.1L91.8 681.5V406.4z" fill="#dbdbdb" p-id="5192"></path><path d="M519.7 498.1l397.4-109.9v519.6l-397.4 109.9V498.1z" fill="#dbdbdb" p-id="5193"></path><path d="M91.8 406.4l427.9 91.7v516.8L91.8 910.8V406.4z" fill="#dbdbdb" p-id="5194"></path><path d="M519.7 497.3L91.8 406.4 0.1 589.8l443.2 104.1 76.4-196.6z" fill="#dbdbdb" p-id="5195"></path><path d="M519.7 498.1l397.4-109.9 107 183.4L642 696.8 519.7 498.1z" fill="#dbdbdb" p-id="5196"></path><path d="M734.7 401.8s17-107.2 105.8-160.6c0 0 7.8 8.8 23.2 28.6 0 0-40.4-6.4-129 132z" fill="#dbdbdb" p-id="5197"></path><path d="M519.7 397.4s1.7-58.7 44.7-191.2c0 0 7.8 8.8 23.2 28.6 0 0-16.2 14.1-67.9 162.6z" fill="#dbdbdb" p-id="5198"></path><path d="M370.3 386.8s-48.4-142.2-166.9-206.4c0 0-19.8 27.7-41.5 36.5-0.1 0 136.3 47.5 208.4 169.9z" fill="#dbdbdb" p-id="5199"></path></svg>
						<p>该客户没有标签哦~</p>
					</div>
				</div>
				
				<div class="clientDetail_Lable_content">
					<ul>
						<li>一般</li>
						<li>核心</li>
						<li>重要</li>
					</ul>
				</div>
				
				<div class="clientDetail_LableTitle_container">
					<span>个人标签：</span>
				</div>
				
				<div class="clientDetail_LableNone_container">
					<div class="clientDetail_LableNone_content">
						<svg t="1596380779368" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5182" width="200" height="200"><path d="M23 82.6h61.1c4.2 0 7.6 3.4 7.6 7.6 0 4.2-3.4 7.6-7.6 7.6H23c-4.2 0-7.6-3.4-7.6-7.6 0-4.2 3.4-7.6 7.6-7.6z" fill="#dbdbdb" p-id="5183"></path><path d="M53.6 52c4.2 0 7.6 3.4 7.6 7.6v61.1c0 4.2-3.4 7.6-7.6 7.6-4.2 0-7.6-3.4-7.6-7.6V59.6c0-4.2 3.4-7.6 7.6-7.6z" fill="#dbdbdb" p-id="5184"></path><path d="M358.4 122.3l29.5 7.9c4.1 1.1 6.5 5.3 5.4 9.4-1.1 4.1-5.3 6.5-9.4 5.4l-29.5-7.9c-4.1-1.1-6.5-5.3-5.4-9.4 1.2-4.1 5.3-6.5 9.4-5.4z" fill="#dbdbdb" p-id="5185"></path><path d="M412.8 79.4l7.9 29.5c1.1 4.1-1.3 8.3-5.4 9.4-4.1 1.1-8.3-1.3-9.4-5.4L398 83.3c-1.1-4.1 1.3-8.3 5.4-9.4 4.1-1 8.3 1.4 9.4 5.5z" fill="#dbdbdb" p-id="5186"></path><path d="M477.1 105l-21.6 21.6c-3 3-7.8 3-10.8 0-3-3-3-7.8 0-10.8l21.6-21.6c3-3 7.8-3 10.8 0 3 3 3 7.8 0 10.8z" fill="#dbdbdb" p-id="5187"></path><path d="M939 119.3c-25.3 0-45.8 20.5-45.8 45.9 0 25.3 20.5 45.8 45.8 45.8s45.9-20.5 45.9-45.8c-0.1-25.4-20.6-45.9-45.9-45.9z m0 76.4c-16.9 0-30.6-13.7-30.6-30.6 0-16.9 13.7-30.6 30.6-30.6s30.6 13.7 30.6 30.6c-0.1 16.9-13.8 30.6-30.6 30.6z" fill="#dbdbdb" p-id="5188"></path><path d="M763.9 32L718 50.6v61.1l45.9-18.6V32z" fill="#dbdbdb" p-id="5189"></path><path d="M664.4 93.1l45.9 18.6V50.6L664.4 32v61.1zM763.9 25.9L714.7 6.5l-50.3 17.4 50.1 21.3 49.4-19.3z" fill="#dbdbdb" p-id="5190"></path><path d="M917.1 388.2l-458.5-61.1v242.3l458.5 48.1V388.2z" fill="#dbdbdb" p-id="5191"></path><path d="M91.8 406.4l366.8-79.3v275.1L91.8 681.5V406.4z" fill="#dbdbdb" p-id="5192"></path><path d="M519.7 498.1l397.4-109.9v519.6l-397.4 109.9V498.1z" fill="#dbdbdb" p-id="5193"></path><path d="M91.8 406.4l427.9 91.7v516.8L91.8 910.8V406.4z" fill="#dbdbdb" p-id="5194"></path><path d="M519.7 497.3L91.8 406.4 0.1 589.8l443.2 104.1 76.4-196.6z" fill="#dbdbdb" p-id="5195"></path><path d="M519.7 498.1l397.4-109.9 107 183.4L642 696.8 519.7 498.1z" fill="#dbdbdb" p-id="5196"></path><path d="M734.7 401.8s17-107.2 105.8-160.6c0 0 7.8 8.8 23.2 28.6 0 0-40.4-6.4-129 132z" fill="#dbdbdb" p-id="5197"></path><path d="M519.7 397.4s1.7-58.7 44.7-191.2c0 0 7.8 8.8 23.2 28.6 0 0-16.2 14.1-67.9 162.6z" fill="#dbdbdb" p-id="5198"></path><path d="M370.3 386.8s-48.4-142.2-166.9-206.4c0 0-19.8 27.7-41.5 36.5-0.1 0 136.3 47.5 208.4 169.9z" fill="#dbdbdb" p-id="5199"></path></svg>
						<p>该客户没有标签哦~</p>
					</div>
				</div>
				
				<div class="clientDetail_Lable_content">
					<ul>
						<li>一般</li>
						<li>核心</li>
						<li>重要</li>
					</ul>
				</div>
				
			</div>-->
		</div>
	</div>
	<div class="add_dynamic_container" id="addDynamic" style="display: none;">
		<form class="" id="formadd" action="">
			<input type="hidden" name="et_id" value="{$et->id}">
			<input type="hidden" name="user_id" value="{$et->user_id}">
			<input type="hidden" name="eventType" value="1">
			<div class="pushSOP_main_contaienr">
				<h2 class="pushSOP_title">添加事件</h2>
				<div class="addEvent_nav_container">
					<span class="addEvent_navActive" data-id="1">自定义事件</span>
					<span data-id="2">模板事件</span>
				</div>
				<!--  -->
				<div class="addEvent_main_container">
					<div class="addEvent_mainCustom_container">
						<textarea placeholder="请输入要添加的备注信息吧，添加成功后将出现在客户动态列表里~" name="content" id="dynamic_content" maxlength="100"></textarea>
						<!-- 新加的上传图片 -->
						<div class="addEvent_UpLoadImg_container" style="margin-top: 7px;">
							<div class="layui-upload">
							  <button type="button" class="layui-btn" id="test2">上传图片</button> 
							  <blockquote class="layui-elem-quote layui-quote-nm addEvent_UpLoadImg_content" style="margin-top: 10px; display: none;">
							    预览图：<span style="color: #999;">（点击图片即可删除）</span>
							    <div class="layui-upload-list" id="demo2"></div>
							 </blockquote>
							</div>
						</div>
						<div id="test2-input">
						</div>
					</div>
					<div class="addEvent_mainTemplate_container" style="display: none;">
						<div class="addEvent_mainTemplate_selectEvent_container">
							<span>选择事件：</span>
							<div class="addEvent_mainTemplate_dropDown_contianer">
								<div class="addEvent_mainTemplate_dropDown_content">
									<div class="addEvent_mainTemplate_dropDownShow_content">
										<p>选择模板事件</p>
										<svg t="1607592186461" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3354" width="16" height="16"><path d="M464.6 736C346 613.3 227.3 490.5 108.8 367.8c-48.9-50.5 30.5-125.9 79.5-75.1C293.9 401.9 399.4 511.2 505 620.3 614.2 510.6 723.6 400.8 832.8 291c49.7-50 129.1 25.4 79.5 75.2C789.6 489.5 666.9 612.7 544.2 736c-20.4 20.4-59.4 20.9-79.6 0z" p-id="3355"></path></svg>
									</div>
									<ul class="addEvent_mainTemplate_dropDownHide_content" style="display: none;">
										{loop $template_event as $event}
										<li data-event_id="{$event->id}">
											<p>{$event->name}</p>
											<svg class="editPopup" t="1607329960572" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6491" width="16" height="16"><path d="M684.202667 117.248c15.893333-15.872 42.154667-15.36 58.922666 1.408l90.517334 90.517333c16.661333 16.661333 17.344 42.986667 1.429333 58.922667l-445.653333 445.653333c-7.936 7.914667-23.104 16.746667-34.218667 19.776l-143.701333 39.253334c-21.909333 5.994667-35.114667-7.104-29.568-28.949334l37.248-146.773333c2.773333-10.944 11.562667-26.346667 19.392-34.176l445.653333-445.653333zM268.736 593.066667c-2.901333 2.901333-8.106667 12.074667-9.130667 16.021333l-29.12 114.773333 111.957334-30.570666c4.437333-1.216 13.632-6.549333 16.810666-9.728l445.653334-445.653334-90.517334-90.496-445.653333 445.653334zM682.794667 178.986667l90.517333 90.517333-30.186667 30.186667-90.496-90.517334 30.165334-30.165333z m-362.026667 362.048l90.496 90.517333-30.165333 30.165333-90.517334-90.496 30.165334-30.186666zM170.666667 874.666667c0-11.776 9.429333-21.333333 21.461333-21.333334h661.077333a21.333333 21.333333 0 1 1 0 42.666667H192.128A21.333333 21.333333 0 0 1 170.666667 874.666667z" fill="#616161" p-id="6492"></path></svg>
											<svg class="deletePopup" t="1607330001680" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11923" width="16" height="16"><path d="M888 262.3H136.8c-17.9 0-32.4-14.5-32.4-32.4s14.5-32.4 32.4-32.4H888c17.9 0 32.4 14.5 32.4 32.4s-14.5 32.4-32.4 32.4z" fill="#666666" p-id="11924"></path><path d="M749.2 895.5H269.8c-45.4 0-82.3-36.9-82.3-82.3V257.6c0-17.9 14.5-32.4 32.4-32.4s32.4 14.5 32.4 32.4v555.7c0 9.5 8 17.5 17.5 17.5h479.4c9.5 0 17.4-8 17.4-17.5V257.6c0-17.9 14.5-32.4 32.4-32.4s32.4 14.5 32.4 32.4v555.7c0.1 45.3-36.8 82.2-82.2 82.2z" fill="#666666" p-id="11925"></path><path d="M386.5 709.6c-17.9 0-32.4-14.5-32.4-32.4V415.3c0-17.9 14.5-32.4 32.4-32.4s32.4 14.5 32.4 32.4v261.9c0 17.9-14.5 32.4-32.4 32.4zM509.5 709.6c-17.9 0-32.4-14.5-32.4-32.4V415.3c0-17.9 14.5-32.4 32.4-32.4s32.4 14.5 32.4 32.4v261.9c0 17.9-14.5 32.4-32.4 32.4zM632.6 709.6c-17.9 0-32.4-14.5-32.4-32.4V415.3c0-17.9 14.5-32.4 32.4-32.4s32.4 14.5 32.4 32.4v261.9c0 17.9-14.5 32.4-32.4 32.4zM660 249.9c-17.9 0-32.4-14.5-32.4-32.4v-41.6c0-12.7-10.3-23.1-23.1-23.1h-190c-12.7 0-23.1 10.3-23.1 23.1v41.6c0 17.9-14.5 32.4-32.4 32.4s-32.4-14.5-32.4-32.4v-41.6c0-48.5 39.4-87.9 87.9-87.9h190.1c48.5 0 87.9 39.4 87.9 87.9v41.6c0 17.9-14.5 32.4-32.5 32.4z" fill="#616161" p-id="11926"></path></svg>
										</li>
										{/loop}
									</ul>
								</div>
								<span id="newCreat">+ 新建</span>
							</div>
							<div class="addEvent_mainTemplate_dropDownNew_contianer" style="display: none;">
								<input type="hidden" name="eventId" value="">
								<input type="text" name="eventName" placeholder="请输入事件名称~">
								<div class="addEvent_mainTemplate_dropDownNew_content">
									<span id="confirm" style="color: #1890ff !important;">确定</span>
									<span id="cancel" style="margin-left: 10px; color: #666 !important;">取消</span>
								</div>
							</div>
						</div>
						<div class="addEvent_mainTemplate_selectRemarks_container">
							<span>备注：</span>
							<input type="hidden" name="contentEventId" value="">
							<textarea placeholder="请输入要添加的备注信息吧，添加成功后将出现在客户动态列表里~" name="contentEvent" id="dynamic_content_event" maxlength="100"></textarea>
						</div>

					</div>
				</div>

				<!-- <div class="addEvent_score_container">
					<div class="addEvent_scoreAdd_container">
						<button>+ 添加评分</button>
					</div>

					<div class="addEvent_scoreDelete_container" style="display: none;">
						<button>取消添加评分</button>
						<div class="addEvent_scoreDelete_content">
							<p>给改客户添加</p>
							<input type="text" name="">
							<span>分</span>
						</div>
						
					</div>
				</div> -->
				<div class="layui-form-item">
					<div class="pushSOP_button_content">
						<button type="button" class="layui-btn layui-btn-primary layui-btn-sm" onclick="layer.close(layer.index)">取消</button>
						<button type="button" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit lay-filter="dynamicRecord">添加</button>
					</div>
				</div>
			</div>
		</form>
	</div>
	<script src="/cdn/jquery.js"></script>
	<script src="/layui/layui.js"></script>
	<script src="/js/ajax.js"></script>
	<script type="text/javascript">
		layui.use(['element','layer'], function(){
			var element = layui.element,
				 layer = layui.layer;
		}); 
			//表单
		layui.use('form', function(){
			var form = layui.form;
		  //监听提交
		  form.on('submit(formDemo)', function(data){
		  	layer.msg(JSON.stringify(data.field));
		  	return false;
		  });

		});
	</script>
	<!-- 上传图片 -->
	<script type="text/javascript">
		layui.use(['upload', 'element', 'layer'], function(){
		  var $ = layui.jquery
		  ,upload = layui.upload
		  ,element = layui.element
		  ,layer = layui.layer;
		  //多图片上传
		   upload.render({
		     elem: '#test2'
		     ,number:'1'
		     ,field:'img'
		     ,url: '/Addons/Upload/Admin/UploadImage/upload_library_img.html' //改成您自己的上传接口
		     ,multiple: true
		     ,before: function(obj){
		     	$('.addEvent_UpLoadImg_content').show();
		     	let num = $('.layui-upload-img').length;
		     	if(num >= 9){
		     		alert('最多上传9张');
		     		return
		     	}
		       //预读本地文件示例，不支持ie8
		       // obj.preview(function(index, file, result){
		       // 	console.log(index)
		       // 	console.log(file)
		       //   $('#demo2').append('<img src="'+ result +'" alt="'+ file.name +'" class="layui-upload-img">')
		       // });
		     }
		     ,done: function(res){
		       var time = new Date().getTime();
		       $('#demo2').append('<img src="'+ res.data +'" alt="'+ res.data +'" class="layui-upload-img" data-id="'+time+'">')
		       var htmlinput = '';
		       	   htmlinput += '<input type="hidden" id="'+time+'" name="test2[]" value="'+res.data+'">';
		       $("#test2-input").append(htmlinput);
		     }
		   });
		})
		$( "body" ).on( "click",".layui-upload-img", function() {
		  let src_id = $(this).data('id');
		  $("#"+src_id).remove();
		  $(this).remove();

		  let num = $('.layui-upload-img').length;
		  if(num <= 0){
		  	$('.addEvent_UpLoadImg_content').hide();
		  }
		});
	</script>
	<script type="text/javascript">
			// 选择当前模板事件
		$('.addEvent_mainTemplate_dropDownHide_content li').click(function(e){
			$(this).parent().prev().children('p').text($(this).children('p').text());
			$(this).parent().prev().children('p').css('color','#333');
			$(this).parent().hide();
			$("input[name='contentEventId']").val($(this).data('event_id'));
		})
		// 显示下拉列表 
		$('.addEvent_mainTemplate_dropDownShow_content').click(function(e){
			if($('.addEvent_mainTemplate_dropDownHide_content').css('display')!='none'){
				$('.addEvent_mainTemplate_dropDownHide_content').hide();
			}else{
				$('.addEvent_mainTemplate_dropDownHide_content').show();
			}
			
		})
		// 点击新建
		$('#newCreat').click(function(){
			$("input[name='eventId']").val('');
			$("input[name='eventName']").val('');
			$('.addEvent_mainTemplate_dropDown_contianer').css('display','none');
			$('.addEvent_mainTemplate_dropDownNew_contianer').css('display','flex');
		})
		//事件名编辑
		$(".editPopup").on('click',function(){
			let eventId = $(this).parent().data('event_id');
			let eventName = $(this).prev().text();
			$("input[name='eventId']").val(eventId);
			$("input[name='eventName']").val(eventName);
			$('.addEvent_mainTemplate_dropDown_contianer').css('display','none');
			$('.addEvent_mainTemplate_dropDownNew_contianer').css('display','flex');
		})
		//事件名删除
		$(".deletePopup").on('click',function(){
			let _this = $(this);
			let id = _this.parent().data('event_id');
			myAjaxPost(false, true, 'add_template_even.html', !{type:3,event:'',id:id}, function (resp) {
				console.log(resp);
				if(resp.status == 'success'){
					layer.msg(resp.msg);
					if(resp.data.name == _this.parent().parent().prev().children('p').text()){
						_this.parent().parent().prev().children('p').text('')
						$("input[name='contentEventId']").val('');
						_this.parent().remove();
					}
				}else{
					lert(resp.msg);
				}
			})
		})
		// 点击取消
		$('#cancel').click(function(){
			$('.addEvent_mainTemplate_dropDownNew_contianer').css('display','none');
			$('.addEvent_mainTemplate_dropDown_contianer').css('display','flex');
		})
		// 点击确定
		$('#confirm').click(function(){
			let _this = $(this);
			let name = $("input[name='eventName").val();
			let id = $("input[name='eventId']").val();
			if(name == ""){
				alert('不能为空');
				return
			}
			let etype = 1;
			if(id){
				etype = 2;
			}
			myAjaxPost(false, true, 'add_template_even.html', !{type:etype,event:name,id:id}, function (resp) {
				if(resp.status == 'success'){
					layer.msg(resp.msg);
					$('.addEvent_mainTemplate_dropDownShow_content p').text(name);
					$('.addEvent_mainTemplate_dropDownShow_content p').css('color','#333');
					$('.addEvent_mainTemplate_dropDownNew_contianer').css('display','none');
					$('.addEvent_mainTemplate_dropDown_contianer').css('display','flex');
					$("input[name='contentEventId']").val(resp.data.id);
					if(etype == 1){
						let html_event = '';
						html_event += '<li data-event_id="'+resp.data.id+'">';
						html_event +=	'<p>'+name+'</p>';
						html_event +=	'<svg class="editPopup" t="1607329960572" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6491" width="16" height="16"><path d="M684.202667 117.248c15.893333-15.872 42.154667-15.36 58.922666 1.408l90.517334 90.517333c16.661333 16.661333 17.344 42.986667 1.429333 58.922667l-445.653333 445.653333c-7.936 7.914667-23.104 16.746667-34.218667 19.776l-143.701333 39.253334c-21.909333 5.994667-35.114667-7.104-29.568-28.949334l37.248-146.773333c2.773333-10.944 11.562667-26.346667 19.392-34.176l445.653333-445.653333zM268.736 593.066667c-2.901333 2.901333-8.106667 12.074667-9.130667 16.021333l-29.12 114.773333 111.957334-30.570666c4.437333-1.216 13.632-6.549333 16.810666-9.728l445.653334-445.653334-90.517334-90.496-445.653333 445.653334zM682.794667 178.986667l90.517333 90.517333-30.186667 30.186667-90.496-90.517334 30.165334-30.165333z m-362.026667 362.048l90.496 90.517333-30.165333 30.165333-90.517334-90.496 30.165334-30.186666zM170.666667 874.666667c0-11.776 9.429333-21.333333 21.461333-21.333334h661.077333a21.333333 21.333333 0 1 1 0 42.666667H192.128A21.333333 21.333333 0 0 1 170.666667 874.666667z" fill="#616161" p-id="6492"></path></svg>';
						html_event +=	'<svg class="deletePopup" t="1607330001680" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="11923" width="16" height="16"><path d="M888 262.3H136.8c-17.9 0-32.4-14.5-32.4-32.4s14.5-32.4 32.4-32.4H888c17.9 0 32.4 14.5 32.4 32.4s-14.5 32.4-32.4 32.4z" fill="#666666" p-id="11924"></path><path d="M749.2 895.5H269.8c-45.4 0-82.3-36.9-82.3-82.3V257.6c0-17.9 14.5-32.4 32.4-32.4s32.4 14.5 32.4 32.4v555.7c0 9.5 8 17.5 17.5 17.5h479.4c9.5 0 17.4-8 17.4-17.5V257.6c0-17.9 14.5-32.4 32.4-32.4s32.4 14.5 32.4 32.4v555.7c0.1 45.3-36.8 82.2-82.2 82.2z" fill="#666666" p-id="11925"></path><path d="M386.5 709.6c-17.9 0-32.4-14.5-32.4-32.4V415.3c0-17.9 14.5-32.4 32.4-32.4s32.4 14.5 32.4 32.4v261.9c0 17.9-14.5 32.4-32.4 32.4zM509.5 709.6c-17.9 0-32.4-14.5-32.4-32.4V415.3c0-17.9 14.5-32.4 32.4-32.4s32.4 14.5 32.4 32.4v261.9c0 17.9-14.5 32.4-32.4 32.4zM632.6 709.6c-17.9 0-32.4-14.5-32.4-32.4V415.3c0-17.9 14.5-32.4 32.4-32.4s32.4 14.5 32.4 32.4v261.9c0 17.9-14.5 32.4-32.4 32.4zM660 249.9c-17.9 0-32.4-14.5-32.4-32.4v-41.6c0-12.7-10.3-23.1-23.1-23.1h-190c-12.7 0-23.1 10.3-23.1 23.1v41.6c0 17.9-14.5 32.4-32.4 32.4s-32.4-14.5-32.4-32.4v-41.6c0-48.5 39.4-87.9 87.9-87.9h190.1c48.5 0 87.9 39.4 87.9 87.9v41.6c0 17.9-14.5 32.4-32.5 32.4z" fill="#616161" p-id="11926"></path></svg>';
						html_event +=	'</li>';
						$('.addEvent_mainTemplate_dropDownHide_content').append(html_event);
					}else if(etype == 2){
						$('.addEvent_mainTemplate_dropDownHide_content li').each(function(){
							if($(this).data('event_id') == resp.data.id){
								$(this).children('p').text(resp.data.name);
							}
						})
					}
					
				}else{
					lert(resp.msg);
				}
			})
		})
		$('.addEvent_scoreAdd_container button').click(function(e){
			e.preventDefault();
			$('.addEvent_scoreAdd_container').hide();
			$('.addEvent_scoreDelete_container').show();

		})
		$('.addEvent_scoreDelete_container button').click(function(e){
			e.preventDefault();
			$('.addEvent_scoreDelete_content input').val('');
			$('.addEvent_scoreDelete_container').hide();
			$('.addEvent_scoreAdd_container').show();
		})
		$('.addEvent_nav_container span').click(function(e){
			let type = e.currentTarget.dataset.id;
			$('.addEvent_nav_container span').removeClass('addEvent_navActive');
			$(this).addClass('addEvent_navActive');
			if(type == 1){
				$("input[name='eventType']").val(1);
				$('.addEvent_mainTemplate_container').css('display','none');
				$('.addEvent_mainCustom_container').css('display','block');
			}else if(type == 2){
				$("input[name='eventType']").val(2);
				$('.addEvent_mainCustom_container').css('display','none');
				$('.addEvent_mainTemplate_container').css('display','block');
			}
		})
	</script>
	<script type="text/javascript">
		$(".add_dynamic").on('click',function(){
		var index = layer.open({
			  title: ['添加事件', 'font-weight:bold;'],
			  type: 1,
			  shadeClose: true,
			  shade: 0.2,
			  area: ['550px', '500px'],
			  // content: 'add_event.html'
			  content: $('#addDynamic')
			})
		})

		layui.use('form', function(){
			var form = layui.form;
			//监听提交
		    form.on('submit(dynamicRecord)', function(data){
		        // layer.msg(JSON.stringify(data.field));
		        // return false;
		        if($("input[name='eventType']").val() == 1){
		        	if($("#dynamic_content").val() == ''){
		        		 layer.msg('备注不能为空');
		        		return;
		        	}
		        }else{
		        	if($("input[name='contentEventId']").val() == ''){
		        		layer.msg('请选择模板');
		        		return;
		        	}
		        	if($("#dynamic_content_event").val() == ''){
		        		layer.msg('备注不能为空');
		        		return;
		        	}
		        }
				// console.log($(".clientDetail_mainTrends_content").length); 
				// console.log($(".clientDetail_mainTrends_content").eq(0).data('date'));
		        var formData = $('#formadd').serialize();
		        myAjaxPost(false, true, 'add_dynamic_record.html', formData, function (resp) {
		          if(resp.status == 'success') {
		            layer.msg(resp.msg);
		            let html = "";
		            var ul_1 = $(".clientDetail_mainTrends_content");
	            	if((ul_1.length == 0) || (ul_1.length > 0 && ul_1.eq(0).data('date') != resp.data.ztime)){
	            		let date =  resp.data.ztime.split('_');
	            		html += '<ul class="clientDetail_mainTrends_content" data-date="'+resp.data.ztime+'">';
						html +=		'<li>';
						html +=			'<div class="clientDetail_mainTrendsLeft_container">';
						html +=				'<div class="clientDetail_mainTrendsLeft_content">';
						html +=					'<b>';
						html +=						date[1];
						html +=					'</b>';
						html +=					'<span>';
						html +=						date[0]+'月';
						html +=					'</span>';
						html +=				'</div>';
						html +=			'</div>';
						html +=			'<ul class="clientDetail_mainTrendsCenterList_container">';
	            	}

	            	html += '<li>';
					html +=		'<div class="clientDetail_mainTrendsCenter_container">';
					html +=			'<svg viewBox="0 0 1024 1024"><path d="M571.072 10.88c9.92-12.736 28.864-13.952 40.448-2.432l387.008 387.072a27.264 27.264 0 0 1-2.432 40.32 302.72 302.72 0 0 1-295.936 45.76l-56.192 56.192a416 416 0 0 1-46.912 457.024 31.872 31.872 0 0 1-46.976 2.496l-229.76-229.76-149.888 149.76a57.216 57.216 0 0 1-80.768 0 57.216 57.216 0 0 1 0-80.768l149.76-149.888-229.76-229.76a31.808 31.808 0 0 1-1.792-42.624l4.288-4.352a416.064 416.064 0 0 1 456.96-47.168l56.128-56.064A302.976 302.976 0 0 1 571.072 10.944z"></path></svg>';
					html +=			'<div class="clientDetail_mainTrendsCenter_Info_container">';
					html +=			'<h4>'+resp.data.title+'</h4>';
					html +=				'<div class="clientDetail_mainTrendsCenter_Info_content">';
					html +=     		'<img src="'+resp.data.avatar+'">';
					html +=				'<p>'+resp.data.et_name+' 添加【'+resp.data.content+'】</p>';
					html +=				'</div>';
					html +=			'</div>';
					html +=		'</div>';
					html +=		'<div class="clientDetail_mainTrendsRight_container">';
					html +=			'<p>'+resp.data.jtime+'</p>';
					html +=		'</div>';
					html +=	'</li>';
					if((ul_1.length == 0) || (ul_1.length > 0 && ul_1.eq(0).data('date') != resp.data.ztime)){
						html += 		'</ul>';
						html += 	'</li>';
						html += '</ul>';
						var addObj1 = $("#title_container");
						addObj1.after(html);
					}else{
						var addObj2 = $(".clientDetail_mainTrendsCenterList_container").eq(0);
						addObj2.prepend(html);
					}
					$('#formadd')[0].reset();
					location.reload();
		            // layer.close(layer.index);
		          }else{
		            alert(resp.msg);
		          }
		        })
		    });
		})
	</script>
	<script type="text/javascript">
		$('.clientDetail_ServiceNameList_container li').on('click',function(){
			$('.clientDetail_ServiceNameList_container li').removeClass('clientDetail_ServiceNameList_active');
			$(this).addClass('clientDetail_ServiceNameList_active');
			$('#user_avatar').attr('src',$(this).data('avatar'));
			$('#user_name').html($(this).data('name'));
			$('#user_add_way').html($(this).data('add_way'));
			$('#user_createtime').html($(this).data('createtime'));
			$('#user_gender').html($(this).data('gender'));
			if($(this).data('r_user_id')){
				$('#user_mobiles').html("<input type='text'name='title' disabled='disabled'  data-names='电话' data-type='mobiles' value='"+$(this).data('mobile')+"'>"+"<input type='hidden'id='ids' value='"+$(this).data('id')+"'>");
				$('#user_description').html("<input type='text'name='title' data-names='描述' data-type='description' value='"+$(this).data('description')+"'>"+"<input type='hidden'id='ids' value='"+$(this).data('id')+"'>");
				$('#age').html("<input type='text'name='title' ddisabled='disabled' ata-names='年龄' data-type='age' value='"+$(this).data('age')+"'>"+"<input type='hidden'id='ids' value='"+$(this).data('id')+"'>");
				$('#email').html("<input type='text'name='title' disabled='disabled' data-names='邮箱' data-type='email' value='"+$(this).data('email')+"'>"+"<input type='hidden'id='ids' value='"+$(this).data('id')+"'>");
				$('#birthday').html("<input type='text'name='title' disabled='disabled' data-names='生日' data-type='birthday' value='"+$(this).data('birthday')+"'>"+"<input type='hidden'id='ids' value='"+$(this).data('id')+"'>");
				$('#weibo').html("<input type='text'name='title' disabled='disabled' data-names='微博' data-type='weibo' value='"+$(this).data('weibo')+"'>"+"<input type='hidden'id='ids' value='"+$(this).data('id')+"'>");
				$('#qq').html("<input type='text'name='title' disabled='disabled'  data-names='QQ' data-type='qq' value='"+$(this).data('qq')+"'>"+"<input type='hidden'id='ids' value='"+$(this).data('id')+"'>");
				$('#address').html("<input type='text' name='title' disabled='disabled' data-names='地址' data-type='address' value='"+$(this).data('address')+"'>"+"<input type='hidden'id='ids' value='"+$(this).data('id')+"'>");
			}else{
				$('#user_mobiles').html("<input type='text'name='title'  data-names='电话' data-type='mobiles' value='"+$(this).data('mobile')+"'>"+"<input type='hidden'id='ids' value='"+$(this).data('id')+"'>");
				$('#user_description').html("<input type='text'name='title' data-names='描述' data-type='description' value='"+$(this).data('description')+"'>"+"<input type='hidden'id='ids' value='"+$(this).data('id')+"'>");
				$('#age').html("<input type='text'name='title' data-names='年龄' data-type='age' value='"+$(this).data('age')+"'>"+"<input type='hidden'id='ids' value='"+$(this).data('id')+"'>");
				$('#email').html("<input type='text'name='title' data-names='邮箱' data-type='email' value='"+$(this).data('email')+"'>"+"<input type='hidden'id='ids' value='"+$(this).data('id')+"'>");
				$('#birthday').html("<input type='text'name='title' data-names='生日' data-type='birthday' value='"+$(this).data('birthday')+"'>"+"<input type='hidden'id='ids' value='"+$(this).data('id')+"'>");
				$('#weibo').html("<input type='text'name='title' data-names='微博' data-type='weibo' value='"+$(this).data('weibo')+"'>"+"<input type='hidden'id='ids' value='"+$(this).data('id')+"'>");
				$('#qq').html("<input type='text'name='title' data-names='QQ' data-type='qq' value='"+$(this).data('qq')+"'>"+"<input type='hidden'id='ids' value='"+$(this).data('id')+"'>");
				$('#address').html("<input type='text'name='title' data-names='地址' data-type='address' value='"+$(this).data('address')+"'>"+"<input type='hidden'id='ids' value='"+$(this).data('id')+"'>");
			}
			
			var html = '';
			$(this).data('fields').forEach(function(text) {
				html += '<span>'+text.title+'</span>';
				if(text.is_x){
					if(text.status == 1){
						if(text.r_user_id){
							html += '<input type="text" name="text" disabled="disabled" onblur="tex('+text.id+','+text.user_id+','+text.wid+',this)" value="'+text.contents+'">';
						}else{
							html += '<input type="text" name="text" onblur="tex('+text.id+','+text.user_id+','+text.wid+',this)" value="'+text.contents+'">';
						}
					}else{
						if(text.r_user_id){
							html += '<select disabled="disabled" onchange="sele('+text.id+','+text.user_id+','+text.wid+',this)" >';
						}else{
							html += '<select onchange="sele('+text.id+','+text.user_id+','+text.wid+',this)">';
						}
						html += '<option value="'+text.contents+'">'+text.contents+'</option>';
						text.content.forEach(function(cont){
							if(text.contents != cont){
								html += '<option value="'+cont+'">'+cont+'</option>';
							}
						})
						html += '</select>';
					}
				}else{
					if(text.status == 1){
						if(text.r_user_id){
							html += '<input type="text" name="text" disabled="disabled" onblur="tex('+text.id+','+text.user_id+','+text.wid+',this)" value="">';
						}else{
							html += '<input type="text" name="text" onblur="tex('+text.id+','+text.user_id+','+text.wid+',this)" value="">';
						}
					}else{
						if(text.r_user_id){
							html += '<select disabled="disabled" onchange="sele('+text.id+','+text.user_id+','+text.wid+',this)" >';
						}else{
							html += '<select onchange="sele('+text.id+','+text.user_id+','+text.wid+',this)" >';
						}
						html += '<option value=""></option>';
						text.content.forEach(function(cont){
							html += '<option value="'+cont+'">'+cont+'</option>';
						})
						html += '</select>';
					}
				}
				html += '<br>';
			})
			$("#fields_all").html();
			$("#fields_all").html(html);
		})
		$('.clientDetail_LableTitleAdd_container').on('click',function(){
			layer.open({
				type: 2,
				title: '请选择标签',
				shadeClose: true,
				shade: 0.2,
				area: ['700px', '400px'],
				content: 'check.html'
			}); 
		})


		$(document).on('blur','[name=title]',function(){
			var title = $(this).val();
			var id = $("#ids").val();
			var type = $(this).data('type');
			var name = $(this).data('names');
			myAjaxPost(false, true, 'update_tag.html', { title:title,id:id,type:type,name:name}, function (resp) {
				if(resp.status == "success"){
		    		tusi(resp.msg);
		    	}else{
		    		tusi(resp.msg);
		    	}
			})
		})
		// $(document).on("change","[name='names']",function(){
		// 		var larel_name = $('#larel_name').val();
		// 		var id = $('.portrait_headerDetailEdit_contents').data('id');
		// 		var input = $('.portrait_headerDetailEdit_contents').data('name');
		// 		myAjaxPost(false, true, 'update_tag.html', { larel_name:larel_name,input:input,id:id}, function (resp) {
		// 	    	if(resp.status == "success"){
		// 	    		tusi(resp.msg);
		// 	    	}else{
		// 	    		tusi(resp.msg);
		// 	    	}
		// 	    })
		// 	})
		
	</script>
<script type="text/javascript">
	function sele(id,user_id,wid,th){
		var content = $(th).val();
		myAjaxPost(false, true, 'upd_user_fields.html', { id:id,user_id:user_id,wid,wid,content:content}, function (resp) {
			tusi(resp.msg);
		})
	}

	function tex(id,user_id,wid,ts){
		var content = $(ts).val();
		if(content == ""){
			tusi(不能为空);
			return false;
		}
		myAjaxPost(false, true, 'upd_user_fields.html', { id:id,user_id:user_id,wid,wid,content:content}, function (resp) {
			tusi(resp.msg);
		})
	}
</script>
</body>
</html>